package com.xbb.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;
import com.xbb.mapper.ServicesTypeMapper;
import com.xbb.entity.ServicesType;
import com.xbb.service.ServicesTypeService;
import org.springframework.stereotype.Service;

@Service
public class ServicesTypeServiceImpl implements ServicesTypeService {

    @Resource
    private ServicesTypeMapper servicesTypeMapper;

    // 删除数据
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return servicesTypeMapper.deleteByPrimaryKey(id);
    }

    // 插入数据
    @Override
    public int insert(ServicesType servicesType) {
        return servicesTypeMapper.insert(servicesType);
    }

    // 插入数据
    @Override
    public int insertSelective(ServicesType servicesType) {
        return servicesTypeMapper.insertSelective(servicesType);
    }

    // 根据ID查询单个数据
    @Override
    public ServicesType selectByPrimaryKey(Integer id) {
        return servicesTypeMapper.selectByPrimaryKey(id);
    }

    // 修改数据
    @Override
    public int updateByPrimaryKeySelective(ServicesType servicesType) {
        return servicesTypeMapper.updateByPrimaryKeySelective(servicesType);
    }

    // 修改数据
    @Override
    public int updateByPrimaryKey(ServicesType servicesType) {
        return servicesTypeMapper.updateByPrimaryKey(servicesType);
    }

    // 根据条件查询分页数据
    @Override
    public List<ServicesType> selectListByPaging(Integer page, Integer limit,String name) {
        return servicesTypeMapper.selectListByPaging(
            (page - 1) * limit,
            limit,
            name
        );
    }

    // 根据条件查询数据条数
    @Override
    public int selectCountByPaging(String name) {
        return servicesTypeMapper.selectCountByPaging(
            name
        );
    }

    // 查询全部数据
    @Override
    public List<ServicesType> selectAll() {
        return servicesTypeMapper.selectAll();
    }

    // 根据条件查询列表数据
    @Override
    public List<ServicesType> selectList(ServicesType servicesType) {
        return servicesTypeMapper.selectList(servicesType);
    }

    // 根据字段、排序方式、limit条 查询列表数据
    @Override
    public List<ServicesType> selectListByLimit(String field, String sort, Integer limit) {
        return servicesTypeMapper.selectListByLimit(field, sort, limit);
    }

    // 根据字段查询列表数据
    @Override
    public List<ServicesType> selectListByField(String field, Object value) {
        return servicesTypeMapper.selectListByField(field, value);
    }

    // 根据条件查询单个数据
    @Override
    public ServicesType selectOne(ServicesType servicesType) {
        return servicesTypeMapper.selectOne(servicesType);
    }

    // 根据ID查询详情数据
    @Override
    public ServicesType selectOneByDetails(Integer id) {
        return servicesTypeMapper.selectOneByDetails(id);
    }

    // 查询全部条数
    @Override
    public int selectAllCount() {
        return servicesTypeMapper.selectAllCount();
    }

    // 根据条件查询数据条数
    @Override
    public int selectCount(ServicesType servicesType) {
        return servicesTypeMapper.selectCount(servicesType);
    }

    // 根据条件修改全部数据
    @Override
    public int updateAll(ServicesType servicesType) {
        return servicesTypeMapper.updateAll(servicesType);
    }


}
